package po;

import org.apache.commons.lang.StringUtils;

public class WangdianZuobiao {

	private String  jingdu;
	private String weidu;	
	private String typeCode;
	
	public String getTypeCode() {
		return typeCode;
	}
	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}
	public String getJingdu() throws Exception {
	
		return this.getdu(jingdu);
		
		
	}
	public void setJingdu(String jingdu) {
		this.jingdu = jingdu;
	}
	public String getWeidu() throws Exception {
	return this.getdu(weidu);
	
	}
	public void setWeidu(String weidu) {
		this.weidu = weidu;
	}
	
	 private String getdu(String du){
		 String[] dus = du.split("\\|");
		 double secondd = new Double(dus[2]).doubleValue()/60;
		 double min = new Double(dus[1]).doubleValue() + secondd;
		 double min2 = min/60;
	
		 double du2 = new Double(dus[0]).doubleValue();
		 double result = du2 + min2;
		
		 return new Double(result).toString();
	 }

	
	
//	public static void main(String args[]){
//		WangdianZuobiao a=new WangdianZuobiao();
//		String c="121|35|15.95";
//		
//		String d="31|11|24.60";
//	
//		System.out.println(a.getdu(c));
//		System.out.println(a.getdu(d));
//		
//		
//	}
	
}
